(function() {
	require(['jquery', 'navigation'], function(jquery, navigation) {
		var opts = {
				type: 'TITLE',
				position: 'SUBTOP',
				data: [{title: '工程名称', url: 'system/getPage.service?path=businessManage/projectLibrary/itemCategory'},
					       {title: '项目管理', url: 'system/getPage.service?path=businessManage/projectLibrary/projectManagement'}],
				selected: '0',
				onSelect: function(item) {
					var url = item.url, selector = '#subPage', main_center ='subCenter';
					if($('#subCenter')) {
						$('#subCenter').empty();
					}
					orange.loadPage({url: url, target: main_center, selector: selector, success: function(response) {
						console.log('页面' + item.title +'加载成功');
					}});
				},
				onLoaded: function() {
					//服务于申报表，清空状态
					//$('#contentNav').data('provinceState', {});
					console.log('navigation组件创建完成');
				}
			};
		 navigation.create('#subNavTop', opts);
	});
})();